"""
The set does not have duplicate values.


"""
_list_1 = [1, 2, 3, 4, 4]

_list_2 = [2, 7, 8]

_set1 = set(_list_1)

print(_set1)

_set2 = set(_list_2)

print(type(_set1))
_set_j = _set1.intersection(_set2)  # 求交集
_set_b = _set1.union(_set2)  # 求并集
_set_c = _set1.difference(_set2)
print(_set_j, _set_b, _set_c)

print(_set1 & _set2)  # 交集
print(_set1 | _set2)  # 并集

print(_set2 - _set2)  # difference# python学习笔记

print(_set1 ^ _set2)

# subset and upperset 子集
print(_set1 - _set2)

# pirnt(_set1.subset(_set2))
